#include <bits/stdc++.h>
using namespace std;
int t,b;
int fun(int a,int b){
    return a*b/__gcd(a,b);
}
const int N=1e5+50;
bool vis[N];
int main(void){
    scanf("%d",&t);
    while(t--){
        memset(vis,false,sizeof(vis));
        int cnt=0;
        scanf("%d",&b);
        for(int a=1;a<=1000;a++){
            int t=fun(a,b)/a;
            if(!vis[t]){
                cnt++;
            }
            vis[t]=true;
        }
        printf("%d\n",cnt);
    }
    return 0;
}